package com.wh1200.xmlless.test.model

import com.wh1200.mybatis.xmlless.annotations.FeignProperty
import com.wh1200.mybatis.xmlless.annotations.JoinObject
import jakarta.persistence.Id

class ParentJoinObjectEntity {

  @Id
  var id2: Int = 0
  var parentId: Int? = null
  @JoinObject(
      joinOnTargetProperty = "id3",
      joinOnThisProperty = "parentId",
  )
  var grandParent: com.wh1200.xmlless.test.model.GrandParentJoinObjectEntity? = null


  @FeignProperty(
      targetEntity = com.wh1200.xmlless.test.model.GrandParentJoinObjectEntity::class,
      joinOnTargetProperty = "id3",
      alias = "p"
  )
  var pfield: String? = null

  var name: String? = null

}
